<layout name="layout" />

<div class="main-div">
    <form name="main_form" method="POST" action="__SELF__" enctype="multipart/form-data" >
    	<input type="hidden" name="id" value="<?php echo $data['id']; ?>" />
		<input type="hidden" name="old_pic" value="<?php echo $data['pic']; ?>" />
		<input type="hidden" name="old_big_pic" value="<?php echo $data['big_pic']; ?>" />
		<input type="hidden" name="old_mid_pic" value="<?php echo $data['mid_pic']; ?>" />
		<input type="hidden" name="old_sm_pic" value="<?php echo $data['sm_pic']; ?>" />
        <table cellspacing="1" cellpadding="3" width="100%">
            <tr>
                <td class="label">分类：</td>
                <td>
                <select name="cat_id">
                    <option value="0">请选择文章分类</option>
                    <?php foreach($catData as $k=>$v) :
                    if($v['id'] == $data['cat_id'])
                    $selected = 'selected ="selected"';
                    else
                    $selected = '';
                    ?>
                    <option <?php echo $selected;?> value="<?php echo $v['id']?>"><?php echo $v['name']; ?></option>
                    <?php endforeach;?>
                </select>
                <span class="require-field">*必须选择分类</span>
                </td>>
            </tr>
            <tr>
                <td class="label">标题：</td>
                <td>
                    <input  type="text" name="title" value="<?php echo $data['title']; ?>" />
                </td>
            </tr>
            <tr>
                <td class="label">简介：</td>
                <td>
                    <input  type="text" name="summary" value="<?php echo $data['summary']; ?>" />
                </td>
            </tr>
            <tr>
                <td class="label">文章来源：</td>
                <td>
                    <input  type="text" name="article_from" value="<?php echo $data['article_from']; ?>" />
                </td>
            </tr>
            <tr>
                <td class="label">文章图片：</td>
                <td>
                    <input type="file" name="pic" /><br />
                    <?php showImage($data['pic'], 100); ?>                </td>
            </tr>
            <tr>
                <td class="label">文章详情：</td>
                <td>
                	<textarea id="detail" name="detail" cols="100" rows="100"><?php echo $data['detail']; ?></textarea>
                </td>
            </tr>
            <tr>
                <td colspan="99" align="center">
                    <input type="submit" class="button" value=" 确定 " />
                    <input type="reset" class="button" value=" 重置 " />
                </td>
            </tr>
        </table>
    </form>
</div>

<link href="__PUBLIC__/umeditor1_2_2-utf8-php/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="__PUBLIC__/umeditor1_2_2-utf8-php/third-party/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/umeditor1_2_2-utf8-php/umeditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/umeditor1_2_2-utf8-php/umeditor.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/umeditor1_2_2-utf8-php/lang/zh-cn/zh-cn.js"></script>
<script>
    UM.getEditor('detail',{
        initalFrameWidth :"100%",
        initalFrameHeight :100
    });
</script>